<template>
	<view>
	<!-- 	<view class="top">
			<navigator url="/pages/index/index" open-type="switchTab">
				<image class="back" src="/static/images/白色左箭头.png" mode=""></image>
			</navigator>
			<view class="title">立即预约</view>
		</view> -->
		<!-- 维修方式 -->
		<view style="margin-top: -250rpx;">
			<uni-card class="topView">
				<view class="itemTitle">维修方式</view>
				<view>
					<uni-data-checkbox v-model="radio1" :localdata="sex"></uni-data-checkbox>
				</view>
			</uni-card>
		</view>

		<!-- 客户信息 -->
		<view style="margin-top: -30rpx;">
			<uni-card>
				<view class="itemTitle">客户信息</view>
				<u-line margin="20rpx 0rpx 30rpx 0rpx"></u-line>

				<uni-forms ref="baseForm" :modelValue="baseFormData">
					<uni-forms-item label="车主姓名" required>
						<uni-easyinput v-model="baseFormData.cname" placeholder="请输入车主姓名" />
					</uni-forms-item>
					<uni-forms-item label="联系方式" required>
						<uni-easyinput v-model="baseFormData.telephone" placeholder="请输入联系方式" />
					</uni-forms-item>
					<uni-forms-item label="预约时间" required>
						<uni-easyinput v-model="baseFormData.orderTime" placeholder="请输入预约时间" />
					</uni-forms-item>
					<uni-forms-item label="取车位置" required v-show="radio1 === 1">
						<uni-easyinput v-model="baseFormData.quAddress" placeholder="请输入取车位置" />
					</uni-forms-item>
				</uni-forms>
			</uni-card>
		</view>

		<!-- 车辆类型 -->
		<view>
			<uni-card>
				<view class="itemTitle">车辆类型</view>
				<u-line margin="20rpx 0rpx 30rpx 0rpx"></u-line>

				<uni-forms ref="baseForm" :modelValue="baseFormData">
					<uni-forms-item label="车辆类型" required>
						<uni-data-select v-model="value" :localdata="range" placeholder="请选择"></uni-data-select>
					
					</uni-forms-item>
					<uni-forms-item label="车牌号" required>
						<uni-easyinput v-model="baseFormData.carNumber" placeholder="请输入车牌号" />
					</uni-forms-item>
				</uni-forms>
			</uni-card>
		</view>

		<!-- 照片 -->
		<!-- <view>
			<uni-card>
				<view class="itemTitle">照片</view>
				<u-line margin="20rpx 0rpx 30rpx 0rpx"></u-line>

				<uni-forms ref="baseForm" :modelValue="baseFormData">
					<uni-forms-item label="整车照片" required>
						<uni-file-picker limit="9" title="最多选择9张图片"></uni-file-picker>
					</uni-forms-item>

					<uni-forms-item label="维修部位照片" required>
						<uni-file-picker limit="9" title="最多选择9张图片"></uni-file-picker>
					</uni-forms-item>
				</uni-forms>
			</uni-card>
		</view> -->
		
		<!-- 提交 -->
		<view class="sub">
			<navigator url="/pages/zwj/yuyuechenggong/yuyuechenggong">
				<u-button type="primary" size="large" text="提交预约"></u-button>
			</navigator>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 车辆类型
				value: "",
				range: [{
						value: 0,
						text: "奔驰"
					},
					{
						value: 1,
						text: "宝马"
					},
					{
						value: 2,
						text: "红旗"
					},
				],

				// 表单数据
				baseFormData: {
					cname: '',
					telephone: '',
					carNumber: '',
					orderTime: '',
					quAddress: '' //取车位置
				},
				radio1: 0, //默认选中
				sex: [{
					text: "到店维修",
					value: 0
				}, {
					text: "上门取车",
					value: 1
				}]

			}
		},
		methods: {
			close() {
				this.show = false
			}


		}
	}
</script>

<style>
	/* 背景图片 */
	.top {
		width: 100%;
		padding-bottom: 120px;
		background: url(../../../static/images/组 8.png);
		background-repeat: no-repeat;
		background-size: cover;
	}
	.top .back {
			position: absolute;
			margin-left: 20px;
			margin-top: 30px;
			width: 15px;
			height: 15px;
			z-index: 2;
		}
	.top .title {
		text-align: center;
		font-size: 18px;
		color: #fff;
		line-height: 44px;
		/* 根据实际需要调整 */
		padding-top: 20px;
	}
	
	/* 维修方式 */
	.topView {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.itemTitle {
		font-size: 30rpx;
		font-weight: bold;
		margin-bottom: 20rpx;
	}
	
	.sub{
		/* width: 400rpx; */
		height: 160rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	

</style>